package com.zzqstart.cateservice.controller.remote.consume;

import com.zzqstart.cateservice.controller.fallback.UcenRemoteControllerFallBack;
import com.zzqstart.commonutils.R;
import com.zzqstart.commonutils.entity.UcenterMember;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * ClassName: UcenRemoteController
 * Package: com.zzqstart.cateservice.controller.remote.consume
 * Description:
 *
 * @Author zzqstart
 * @Create 2023-03-07 0:50
 * @Version 1.0
 */
// 放错位置，一个放在service上UcenRemoteService
@FeignClient(name="service-ucenter",fallback = UcenRemoteControllerFallBack.class)
@Component
public interface UcenRemoteController {
    @GetMapping("/userservice/member/remote/index")
    public List<UcenterMember> getMemberList();

    @GetMapping("/userservice/member/remote/getMemberInfoByMemberId/{memberId}")
    public UcenterMember getMemberInfoByMemberId(@PathVariable("memberId") String memberId);

    @GetMapping("/userservice/member/remote/getMemberIdByMemberName/{memberName}")
    public String getMemberIdByMemberName(@PathVariable("memberName") String memberName);
}
